<extend name="Public/base" />

<block name="body">
	<link href="__STATIC__/bootstrap/css/bootstrap.css" rel="stylesheet">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>{$meta_title}</h2>
		<if condition="$_sheetId neq 0">
			<h5 style="margin-top: 24px">&nbsp;/ 当前谱单：{$_comment[0]['sheet_name']}</h5>
		</if>
	</div>
    
    <div class="container-fluid">
    
    
    	<div class="row">
    		<div class="form-group">
    			<button class="btn btn-return" onclick="location='{:U('Sheet/index')}'">返 回</button>
           		<button class="btn ajax-post confirm" url="{:U('del?sheet_id='.$_sheetId)}" target-form="ids">批量删除</button>
    		</div>
    	</div>


		<div class="row">
			<div class="div_10"></div>
		</div>

		<!-- 数据列表 -->
    	<div class="row">
			<table class="table">
				<thead>
					<tr>
					<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
					<th class="">ID</th>
					<th class="" width="600px">评论内容</th>
					<th class="">用户id</th>
					<th class="">昵称</th>
					<th class="">创建时间</th>
					<th class="">操作</th>
					</tr>
				</thead>
				<tbody>
					<notempty name="_comment">
					<volist name="_comment" id="vo">
					<tr>
						<td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
						<td>{$vo.id} </td>
						<td>{$vo.remark}</td>
						<td>{$vo.user_id}</td>
						<td>{$vo.user_name}</td>
						<td>{$vo.create_time}</td>
						<td>
							<a title="删除" href="{:U('del?id='.$vo['id'])}">删除</a>
						</td>
					</tr>
					</volist>
					<else/>
					<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
					</notempty>
				</tbody>
			</table>
		</div>
		<div class="page">
			{$_page}
		</div>
		<if condition="$_sheetId neq 0">
			<form action="/dms/index.php?s=/Admin/SheetComment/addComment" role="form" method="post" class="form-horizontal">
				<div class="form-group col-sm-6">
					<div class="col-sm-3">
						<lable>选择发布评论帐号：</lable>
						<select name="uid">
							<option value="">--请选择帐号--</option>
							<volist name="_alias" id="val">
								<option value="{$val.id}">{$val.nickname}</option>
							</volist>
						</select>
					</div>
					<div class="col-sm-12">
						<textarea style="height: 180px;" class="form-control muted" name="remark" value="" placeholder="点击此处添加评论......"></textarea>
					</div>

					<div class="col-sm-1" style="margin-top: 5px">
						<input type="hidden" name="sheet_id" value="{$_sheetId}">
						<button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">提 交</button>
					</div>
				</div>
			</form>
		</if>
    </div>
</block>

<block name="script">
	<script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
	<script src="__STATIC__/bootstrap-select/js/bootstrap-select.min.js"></script>

	<script type="text/javascript">

    //导航高亮
    highlight_subnav('{:U('SheetComment/index')}');
    $(function(){
    	
    });
	</script>
</block>
